﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Drawing;
using ListaTelefonicaMEM.Classes;

namespace ListaTelefonicaMEM.Controles
{


    class MaskedTextBoxPadrao : MaskedTextBox
    {
        protected override void OnCreateControl()
        {
            base.OnCreateControl();
            this.Font = new Font(Config.NomeFonte, Config.TamanhoFonte);
        }        

        protected override void OnKeyUp(KeyEventArgs e)
        {
            base.OnKeyUp(e);
            if (e.KeyData == Keys.Space)
            {
                this.Clear();
            }
            else if (e.KeyData == Keys.Return)
            {
                SendKeys.Send("{TAB}");
            }
        }
    }
}
